import http from '@/plugins/axios/index.js';

// 激活码接口下单
export const codeOrder = (params) => {
  return http(`/lt-order/codeOrder.do`, params, {
    method: 'POST'
  }).then((res) => res);
};

// 支付宝支付接口
export const aliPay = (params) => {
  return http(`/yjz-pay/lawtrain/alipay.do`, params, {
    method: 'POST',
    type:'formdata'
  }).then((res) => res);
};

// 微信支付接口
export const weixinPay = (params) => {
  return http(`/yjz-pay/lawtrain/weixin_pay.do`, params, {
    method: 'POST',
    type:'formdata'
  }).then((res) => res);
};

// 判断是否付款成功
export const buyOrder = (params) => {
  return http(`/lt-order/buyOrder.do`, params, {
    method: 'GET'
  }).then((res) => res);
};

// 获取订单信息
export const selectOrder = (params) => {
  return http(`/lt-order/selectOrder.do`, params, {
    method: 'GET'
  }).then((res) => res);
};